package org.csu.onlineedubackend.service;

import org.csu.onlineedubackend.entity.FriendRelationship;
import org.csu.onlineedubackend.entity.FriendRequest;
import org.csu.onlineedubackend.entity.User;

import java.util.List;

public interface FriendService {
    
    // 发送好友申请
    FriendRequest sendFriendRequest(Integer senderId, Integer receiverId);
    
    // 接受好友申请
    FriendRelationship acceptFriendRequest(Long requestId, Integer userId);
    
    // 拒绝好友申请
    FriendRequest rejectFriendRequest(Long requestId, Integer userId);
    
    // 获取用户收到的好友申请
    List<FriendRequest> getPendingFriendRequests(Integer userId);
    
    // 获取用户发送的好友申请
    List<FriendRequest> getSentFriendRequests(Integer userId);
    
    // 获取用户收到的好友申请
    List<FriendRequest> getAllFriendRequests(Integer userId);
    
    // 获取用户的好友列表
    List<User> getFriendList(Integer userId);
    
    // 删除好友
    boolean deleteFriend(Integer userId, Integer friendId);
    
    // 检查两个用户是否是好友
    boolean areFriends(Integer userId1, Integer userId2);
    
    // 根据用户名或姓名搜索用户
    List<User> searchUsers(String keyword);
    
    // 从通知接受好友申请
    FriendRelationship acceptFriendRequestFromNotification(Integer senderId, Integer receiverId, Long notificationId);
    
    // 从通知拒绝好友申请
    boolean rejectFriendRequestFromNotification(Integer senderId, Integer receiverId, Long notificationId);
} 